package com.ssy.lingxi.workflow.api.fallback;

import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.workflow.api.feign.ProcessMemberRoleControllerFeign;
import com.ssy.lingxi.workflow.api.model.vo.request.ProcessMemberRoleVO;
import com.ssy.lingxi.workflow.api.model.vo.request.ProcessRemoveMemberRoleVO;

import javax.validation.Valid;

/**
 * @author 万宁
 * @version 2.0.0
 * @date 2021-10-09
 */
public class ProcessMemberRoleFallback implements ProcessMemberRoleControllerFeign {
    /**
     * 查询流程定义，关联流程步骤与会员自定义角色
     * <p>在新增、修改会员自定义角色的时候调用</p>
     *
     * @param processMemberRoleVO 接口参数
     * @return 操作结果
     */
    @Override
    public Wrapper<Void> updateInsertProcessAsync(@Valid ProcessMemberRoleVO processMemberRoleVO) {
        return Wrapper.fail(ResponseCode.SERVICE_WORKFLOW_ERROR);
    }

    /**
     * 从关联的流程步骤中，移除会员自定义角色
     * <p>在删除会员自定义角色的时候调用</p>
     *
     * @param processRemoveMemberRoleVO 接口参数
     * @return 操作结果
     */
    @Override
    public Wrapper<Void> removeMemberRoleAsync(@Valid ProcessRemoveMemberRoleVO processRemoveMemberRoleVO) {
        return Wrapper.fail(ResponseCode.SERVICE_WORKFLOW_ERROR);
    }
}
